<?php
/*
Template Name:热门主题
*/
get_header(); ?>
<div class="page_width">
	<div class="pagebox">
		<div class="navigate_path"><!--<a href="/">首页</a> > --><span>热门主题</span></div>
	</div>
	<div class="pagebox">
		<div class="all_tags">
		<?php while ( have_posts() ) : the_post(); 
			$html='<ul>';
			foreach(get_tags(array('number'=>150,'orderby'=>'count','order'=>'DESC',
			'hide_empty'=>false))as $tag){
			$color=dechex(rand(0,425));
			$tag_link = '';
			if($tag->count > 0)
				$tag_link=get_tag_link($tag->term_id);
			$html.="<li><a href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug}' style='color:#{$color}'>";
			$html.="{$tag->name}({$tag->count})</a></li>";
			}
			$html .= '</ul>';
			echo $html;
			endwhile; // end of the loop. ?>
		</div>
	</div>
</div>
<?php get_footer(); ?>
